//Generate prime numbers between two given numbers.
class prog6
	{
	public static void main(String [] args)
		{
		int from=10, to=15;
		int [] ps=genPrime(from,to);
		display(ps,from,to);
		}
	public static int[] genPrime(int from, int to)
		{
		int count,size=0;
		for(int v=from;v<to;v++)
			{
			count=0;
			for(int i=1;i<=v && count<=2;i++)
				{
				if(v%i==0)
					count++;
				}
			if(count==1 || count==2)
				size++;
			}
		int [] ps=new int[size];
		for(int v=10,j=0;v<20 && j<size;v++)
			{
			count=0;
			for(int i=1;i<=v && count<=2;i++)
				{
				if(v%i==0)
					count++;
				}
			if(count==1 && count==2)
				{
				System.out.println(v);
				/*ps[j]=v;
				j++;*/
				}
			}
		return ps;
		}
	public static void display(int [] s, int from, int to)
		{
		System.out.println("The prime numbers from " + from + " to " + to + "are : ");
		for(int i=0;i<s.length;i++)
			System.out.println(s[i]);
		}
	}